Working with the Viewer > Integrating with Your Application > Configuring Samples > How to Configure JSP Samples |
This topic contains steps for how to install on Linux and Windows.
Note that JDK 1.7 and JRE 1.7+ are required. |
Prizm Services web tier will be deployed under C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps.
From the splash page you have two options:
Full Viewer
Book Reader
The jsp samples are installed under /usr/share/prizm/Samples/jsp. This folder contains 3 sub-folders, one folder for each of the two samples (book-reader-sample and full-viewer-sample) and one folder for the splash page:
Each of the sample folders are completely self-contained, meaning that they contain all of the files needed to run the sample. Furthermore, with the exception of a few project files and build files, the sample folders contain only the files needed to run the sample.
File / Folder |
Description |
src\com\accusoft\pccis\sample\core src\com\accusoft\pccis\sample\html5 |
Contains the supporting classes for the RESTful communication between the viewer and web server. While the code for the functions can be modified as needed, modifications should be done with care. Most of the current web server RESTful interface passes the request onto Prizm Services. |
WEB-INF/web.xml |
Contains web tier settings. |
File / Folder |
Description |
viewer-assets folder |
Contains the essential JavaScript, CSS, fonts, images, language data, and templates (HTML) that make up the viewer. |
viewer-assets/less folder |
Contains less that can be used to build the viewer CSS. This folder is non-essential, and does not need to be re-distributed. |
viewer-assets/Gruntfile.js |
Contains Grunt tasks to build the viewer less. This file is non-essential and does not need to be re-distributed. |
viewer-assets/package.json |
A file used by npm (a package manager). It defines the dependencies installed by npm, which are required to run Grunt and compile the less. |
viewer-webtier folder |
Contains files that implement the jsp layer of communication between the client-side viewer and the PCC backend services. |
viewer-webtier/pcc.jsp |
File that defines and links the required Prizm RESTful interface to the files in the src folder. The client side Viewer JavaScript object will use this RESTful interface as described in PCC RESTful API. |
index.jsp |
The default page for the sample. The HTML5 viewer’s code gets loaded by this page. |
predefinedSearch.json |
This data file contains information defining search queries that will appear as selectable items in the full viewer. Note: This file is consumed by the page Default.aspx and the JSON is injected into the HTML that is returned by Default.aspx. Ultimately, the predefined search terms are provided as a JavaScript hash, when the viewer is created. |
redactionReason.json |
This data file contains information defining redaction reasons that are available in the viewer.
Note: This file is consumed by the page Default.aspx and the JSON is injected into the HTML that is returned by Default.aspx. Ultimately, the redaction reasons are provided as a JavaScript hash, when the viewer is created. |
File / Folder |
Description |
viewer-assets folder |
Contains the essential JavaScript, CSS, fonts, images, language data, and templates (HTML) that make up the book reader viewer. |
viewer-assets/less folder |
Contains less that can be used to build the viewer CSS. This folder is non-essential, and does not need to be re-distributed. |
viewer-assets/Gruntfile.js |
Contains Grunt tasks to build the viewer less. This file is non-essential and does not need to be re-distributed. |
viewer-assets/package.json |
A file used by npm (a package manager). It defines the dependencies installed by npm, which are required to run Grunt and compile the less. |
viewer-assets/selection.json |
A file used by the IcoMoon application to generate the icons in the book reader viewer. If you need to add an icon to the viewer, you can add the icon to this file and use the IcoMoon application (https://icomoon.io) to generate a new icon font. This file is non-essential and does not need to be re-distributed. |
viewer-webtier folder |
Contains files that implement the jsp layer of communication between the client-side book reader viewer and the PCC backend services. |
viewer-webtier/createSession.jsp |
This file is used by index.jsp to create a PCC Viewing Session with the PCC RESTful API. |
viewer-webtier/pcc.jsp |
File that defines and links the required Prizm RESTful interface to the files in the src folder. The client side Viewer JavaScript object will use this RESTful interface as described in PCC RESTful API. |
WEB-INF/web.xml |
Contains web tier settings. |
index.html |
The default page for the sample. This page calls the createSession.jsp service to start a viewing session with the PCC RESTful services and then the page loads the book reader. |
sample-config.js |
Contains references to the assets, web tier, and language files used by the viewer in this sample. |
The file web.xml is used to configure the resources and storage used by the viewer web tier. This file can be found in the sample folder at: <sample-folder-name>/WEB-INF/web.xml. This file is self-documenting, but a little information about the configuration options is given below.
<LinuxDocumentPath> |
The sample pulls named documents from this location. The LinuxDocumentPath must have read/write permissions in order for the file drag and drop functionality of the splash page to work. |
<LinuxImageStampPath> |
The sample pulls image stamps from this location. Any valid image stamp in this folder will be available to the viewer for use as an image stamp. The LinuxImageStampPath must have read permissions. |
<ValidImageStampTypes> |
A comma separated value list of file extensions. These extensions specify the valid image stamp file types. Only images in the ImageStampPath with a valid file type will be available for use as an image stamp in the viewer. |
<LinuxMarkupsPath> |
Saved markup XML is kept in this folder. The LinuxMarkupsPath will be written to by the web server process, so it must have read/write permissions. |
The file web.xml is used to configure the resources and storage used by the viewer web tier. This file can be found in each sample folder at: <sample-folder-name>/WEB-INF/web.xml. This file is self-documenting, but a little information about the configuration options is given below:
<DocumentPath> |
The sample pulls named documents from this location. The DocumentPath must have read/write permissions in order for the file drag and drop functionality of the splash page to work. |
<ImageStampPath> |
The sample pulls image stamps from this location. Any valid image stamp in this folder will be available to the viewer for use as an image stamp. The ImageStampPath must have read permissions. |
<ValidImageStampTypes> |
A comma separated value list of file extensions. These extensions specify the valid image stamp file types. Only images in the ImageStampPath with a valid file type will be available for use as an image stamp in the viewer. |
<MarkupsPath> |
Saved markup XML is kept in this folder. The MarkupsPath will be written to by the web server process, so it must have read/write permissions. |
<WebService[Scheme|Host|Port|Path|V2Path]> |
Specifies how to connect with the PCC RESTful API. |